#ifndef _w25qxxx_driver_H_
#define _w25qxxx_driver_H_
#include "stdint.h"
#include "stdbool.h"
#include "stdio.h"


#define dW25QXXX_LOG(...) printf(__VA_ARGS__)

typedef enum
{
    eW25QXXX_DeviceID_W25Q80 = 0XEF13,
    eW25QXXX_DeviceID_W25Q16 = 0XEF14,
    eW25QXXX_DeviceID_W25Q32 = 0XEF15,
    eW25QXXX_DeviceID_W25Q64 = 0XEF16,
    eW25QXXX_DeviceID_W25Q128 = 0XEF17,
}W25QXXX_DeviceID_EnumDef;//芯片ID

typedef void (*W25QXXX_func_Delay)(uint32_t millisec);

bool W25QXXX_Init(W25QXXX_DeviceID_EnumDef id,W25QXXX_func_Delay func_Delay);
bool W25QXXX_ReadData(uint32_t address,uint8_t *pbuf,uint16_t size);
void W25QXXX_WriteData(uint32_t address,uint8_t *pbuf,uint16_t size);
void W25QXXX_PowerDown(void);
void W25QXXX_ReleasePowerDown(void);

#endif
